cmake_minimum_required(VERSION 3.10)

# 聊天服务库
add_library(chat_service_lib
    chat_service.cpp
)

# 添加头文件搜索路径
target_include_directories(chat_service_lib PUBLIC
    ${CMAKE_SOURCE_DIR}/include
)

# 链接依赖库
target_link_libraries(chat_service_lib PUBLIC
    network_lib
    database_lib
    cache_lib
    messaging_lib
    common_logger_lib
    crypto
    uuid
)

# 聊天服务可执行文件
add_executable(chat_service
    main.cpp
)

# 链接依赖库
target_link_libraries(chat_service
    chat_service_lib
    common_lib
    network_lib
    database_lib
    cache_lib
    messaging_lib
    mysqlclient
    hiredis
    rdkafka
    rdkafka++
    uuid
) 